#include <stdio.h>  
int main(int argc, char **argv) {  
    double h;  
    int x;  
  
    for (int i = 0; i < 3; i++) {  
        if (scanf("%d%lf", &x, &h));  
        switch (x) {  
            case 1:  
                printf("The Centigrade is %.2f\n", (h - 32) * 5 / 9);  
                break;  
            case 2:  
                printf("The Fahrenheit is %.2f\n", h * 1.8 + 32);  
                break;  
            default:  
                printf("Wrong input!\n");  
        }  
    }  
  
    return 0;  
}  